/**
*	@class ProteinFramework
*
*	@brief
*
*	@author William McVicar
*/

#pragma once

#ifndef __PROTEIN_FRAMEWORK_H_INCLUDED__
#define __PROTEIN_FRAMEWORK_H_INCLUDED__

//  Library Includes

//  Local Includes

//  Macros

//  Forward Declarations

namespace Protein
{
	class IRenderer;
	class IPlatform;
	class Clock;
	class IFileSystem;
	class TextureManager;
}
//  Types

//  Constants

//  Prototypes

namespace Protein
{

class ProteinFramework
{
	//Member Functions
public:

	ProteinFramework();
	~ProteinFramework();

	static bool IsInitialised();
	static bool InitialiseEngine();
	static bool UninitialiseEngine();

	static void Run();

	static IRenderer& renderer();
	static IPlatform& platform();
	static Clock& clock();
	static IFileSystem& fileSystem();
	static TextureManager& textureManager();

protected: 

private: 

#ifdef PROTEIN_PLATFORM_WINDOWS
  static void initialiseWindowsSpecific();
#endif

	//Member Variables
public:

protected: 

private: 

	static IRenderer*		sm_pTheRenderer;
	static IPlatform*		sm_pThePlatform;
	static Clock*			sm_pTheClock;
	static IFileSystem*		sm_pTheFilesystem;
	static TextureManager*	sm_pTheTextureManager;

	static bool				sm_bIsEngineInitialised;
};

inline static IRenderer&		renderer()		{ return ProteinFramework::renderer();		}
inline static IPlatform&		platform()		{ return ProteinFramework::platform();		}
inline static Clock&			clock()			{ return ProteinFramework::clock();			}
inline static IFileSystem&		fileSystem()	{ return ProteinFramework::fileSystem();	}
inline static TextureManager&	textureManager(){ return ProteinFramework::textureManager();}

}
#endif //__PROTEIN_FRAMEWORK_H_INCLUDED__
